################
#PSRM: Explaining Support for Redistribution: Social Insurance Systems and Fairness
#
#Observational Data: Eurobarometer
#Table C 6
#
#Verena Fetscher
#July 2022
####################

####################
# Load packages
####################

library(tidyverse)
library(texreg)
library(DeclareDesign)

####################
# Load data
####################
# EB
load("EB_benefits_17.Rda")



##################
# Fairness Beliefs and Redistribution Preferences
####################

##################
# Table C.6: Linear regression: Support for redistribution, fairness beliefs and benefit concentration
####################

mod1<-lm_robust(redistr~rr+imp_wealthFam+imp_connections+imp_workhard+age+gender+edu_r+leftright+hhsingle+unemp,
                          data=df_merge[df_merge$incgroup==3,])
tidy(mod1)

texreg(list(mod1),stars = c(0.01,0.05,0.1),
       custom.coef.names = c("Intercept", "Benefit concentration","Wealthy family",
                             "Connections","Working hard","Age","Female","Education",
                             "Leftright","Single","Unemployed"))




